<template>
	<view style="padding: 30rpx;">
		<button @click="callSetStorage()">setStorage</button>
		<button @click="getGetStorage">获取缓存</button>
		<button @click="">console.info</button>
		<button @click="">console.warn</button>
		<button @click="">console.error</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			callSetStorage(){
				uni.setStorage({
					key:"userName",
					data:"linhang",
					success(){
						console.log("存储userName 成功回调");
						},
						fail(){
							console.error("存储userName 失败回调");
						}
				})
			},
			calGetStorage(){
				uni.getStorage({
					key:"userName",
					success:function(result){
						console.log("获取本地缓存成功 result.data:"+result.data);
					},
					fail:function(result) {
						onsole.error("获取本地缓存sb:"+JSON.stringify(e));
						onsole.error("获取本地缓存sb:"+result.errMsg);
					}
				})
			},
			callStoInfo(){
				console.log("callStoInfo-->"+ result.keys);
			}
			}
		}
</script>

<style>
button{
	margin: 30rpx;
}
</style>
